package com.yupi.ojjudge.judge.codesandbox;

import com.yupi.ojjudge.judge.model.ExecuteCodeRequest;
import com.yupi.ojjudge.judge.model.ExecuteCodeResponse;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author ortonzhu
 * @Date 2024/10/18 20:52
 */
@Slf4j
@AllArgsConstructor
public class CodeSandBoxProxy implements CodeSandBox {
    private final CodeSandBox codeSandBox;

    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest request) {
        log.info("沙箱请求信息：" + request.toString());
        ExecuteCodeResponse executeCodeResponse = codeSandBox.executeCode(request);
        log.info("沙箱响应信息：" + executeCodeResponse.toString());
        return executeCodeResponse;
    }
}
